﻿


using System;
using Demo.Domain;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

namespace Demo.Domain
{
    public class UserRoleMapping : EntityTypeConfiguration<UserRole>
    {
        public UserRoleMapping()
        {
            this.HasKey(u => u.UserRoleID).Property(u => u.UserRoleID).IsRequired().HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.Property(u => u.UserID).IsRequired();
            this.Property(u => u.RoleID).IsRequired();
        }

    }
}
